package cn.edu.scau.cmi.wujiaming.experiment5.safe;

import java.util.ArrayList;
import java.util.List;

public class SafeComposite implements SafeComponent {
	private String name;
	private List<SafeComponent> list = new ArrayList<>();

	public SafeComposite(String name) {
		this.name = name;
	}

	public String getName() {
		return name;
	}

	public void add(SafeComponent sc) {
		list.add(sc);
	}

	public void remove(SafeComponent sc) {
		list.remove(sc);
	}

	public List<SafeComponent> getList() {
		return list;
	}

	@Override
	public String doSomething() {
		return "对" + name + "文件夹进行查询杀毒";
	}
}